package model.command;
import controller.KeyListeners.*;
import model.playable.Playable;
/**
 *
 * @author joseph
 */
public class Attack extends Combat{
    /**
     *
     *
     * @param listeners
     * @param playable
     */
    public Attack(Playable playable){
        super(playable);
    }
    /**
     *
     */
    public void attachToListener() {
        getListeners().attachToDirectionListener(clone());
    }
    /**
     *
     * @return
     */
    @Override
    public Attack clone(){
        return new Attack(getPlayable());
    }
    /**
     *
     */
    public void executeCommand() {
       ((Combatable)getPlayable()).attack(getDirection());
    }
    /**
     * 
     * @return
     */
    @Override
    public String toString(){
        return "Attack";
    }


}
